SWISS-MODEL - Downloading homology models

This notebook gives a tutorial of the SWISSMODEL object, which is a simple class to parse and download models from the SWISS-MODEL homology model repository.

Input: Path to SWISS-MODEL metadata directory, UniProt accession(s)
Output: Downloaded SWISS-MODEL models

Instructions

  1. Download the metadata for your organism of interest at SWISS-MODEL from here: https://swissmodel.expasy.org/repository, under the column “Download Metadata (Models and structures)”
  2. Extract that directory, which will then create a SWISS-MODEL_Repository folder)
  3. Create a new SWISSMODEL object, pointing it to that folder
  4. Download models for a specified UniProt accession
In [ ]:
from ssbio.databases.swissmodel import SWISSMODEL
In [ ]:
my_swissmodels = SWISSMODEL('/tmp/SWISS-MODEL_Repository/')
In [ ]:
# This gives you a list of all UniProt accession numbers with at least one model
my_swissmodels.uniprots_modeled[:10]
In [ ]:
# This gives you a list of all models available for a UniProt entry
my_swissmodels.get_models(uniprot_acc='Q9I1D5')
In [ ]:
# This downloads all models available for a UniProt entry
my_swissmodels.download_models(uniprot_acc='Q9I1D5', outdir='/tmp/', force_rerun=False)